<template>
  <div class="info-view">
    <div class="info-header">
      <div class="header-content">
        <h2 class="info-title">
          <svg class="info-icon" width="24" height="24" viewBox="0 0 24 24" fill="currentColor">
            <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"/>
          </svg>
          应用信息
        </h2>
        <button @click="goBack" class="back-btn">
          <svg class="back-icon" width="16" height="16" viewBox="0 0 16 16" fill="currentColor">
            <path d="M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z"/>
          </svg>
          返回聊天
        </button>
      </div>
    </div>
    
    <div class="info-content">
      <div class="info-grid">
        <div class="info-card">
          <div class="card-icon">
            <svg width="32" height="32" viewBox="0 0 24 24" fill="currentColor">
              <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/>
            </svg>
          </div>
          <h3 class="card-title">关于</h3>
          <div class="card-content">
            <p class="card-text">基于Vue 3 + TypeScript + Vite构建的现代化Web应用，聚合多方ai模型，提供一站式智能对话服务。</p>
            
            <div class="tech-features">
              <h4 class="feature-title">技术特色</h4>
              <ul class="feature-list">
                <li>本地存储数据持久化</li>
                <li>多模型支持（通义千问、GPT等）</li>
                <li>支持导入自定义api</li>
                <li>md文档渲染支持</li>
                <li>SSE流式响应</li>
              </ul>
            </div>
          </div>
        </div>    
        
        <div class="info-card">
          <div class="card-icon">
            <svg width="32" height="32" viewBox="0 0 24 24" fill="currentColor">
              <path d="M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm0 10.99h7c-.53 4.12-3.28 7.79-7 8.94V12H5V6.3l7-3.11v8.8z"/>
            </svg>
          </div>
          <h3 class="card-title">联系我</h3>
          <div class="support-info">
            <span class="version">Email: xiejia-6@qq.com</span>
            <span class="status">WeChat: Xedesss</span>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script setup lang="ts">
import { useRouter } from 'vue-router'

const router = useRouter()

/**
 * 返回聊天界面
 */
const goBack = () => {
  router.push('/')
}
</script>

<style scoped>
.info-view {
  height: 100vh;
  background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
  color: #e2e8f0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  overflow-y: auto;
}

.info-header {
  background: rgba(30, 41, 59, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.info-title {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 600;
  color: #f1f5f9;
  display: flex;
  align-items: center;
  gap: 12px;
}

.info-icon {
  color: #60a5fa;
}

.back-btn {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.back-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
  background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
}

.back-icon {
  transition: transform 0.3s ease;
}

.back-btn:hover .back-icon {
  transform: translateX(-2px);
}

.info-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

.info-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 40px;
}

.info-card {
  background: rgba(30, 41, 59, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 32px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.info-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #60a5fa, #3b82f6, #1d4ed8);
}

.info-card:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  border-color: rgba(96, 165, 250, 0.3);
}

.card-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.1), rgba(59, 130, 246, 0.1));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: #60a5fa;
}

.card-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: #f1f5f9;
  margin: 0 0 16px 0;
}

.card-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.card-text {
  color: #cbd5e1;
  line-height: 1.6;
  margin: 0;
  font-size: 0.95rem;
}

.tech-features, .app-features {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 16px;
}

.feature-title {
  font-size: 1rem;
  font-weight: 600;
  color: #f1f5f9;
  margin: 0 0 12px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.feature-title::before {
  content: '';
  width: 4px;
  height: 16px;
  background: linear-gradient(135deg, #60a5fa, #3b82f6);
  border-radius: 2px;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.feature-list li {
  color: #cbd5e1;
  padding: 8px 0;
  position: relative;
  padding-left: 24px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.feature-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #10b981;
  font-weight: bold;
  font-size: 0.95rem;
}

.guide-steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}

.step-number {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
}

.support-info {
  display: flex;
  gap: 16px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.version, .status {
  background: rgba(255, 255, 255, 0.1);
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 0.85rem;
  color: #94a3b8;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .info-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .header-content {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
  
  .info-title {
    font-size: 1.5rem;
  }
  
  .info-card {
    padding: 24px;
  }
}
</style>